package com.heiam.search.controller;

import com.heiam.search.service.ApUserSearchService;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.search.dto.HistorySearchDto;
import io.protostuff.Request;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/history")
public class ApUserSearchController {
    @Resource
    private ApUserSearchService apUserSearchService;


    @PostMapping("/load")
    public ResponseResult finUserSearch(){

        return apUserSearchService.finUserSearch();
    }


    @PostMapping("/del")
    public ResponseResult delUserSearch(@RequestBody HistorySearchDto historySearchDto){

        return apUserSearchService.delUserSearch(historySearchDto);
    }

}
